package com.ibox.core.book.ui;

import android.content.Context;
import android.content.Intent;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.Toolbar;

import com.ibox.base.BaseActivity;
import com.ibox.core.book.R;
import com.ibox.core.book.adapter.TopRankAdapter;
import com.ibox.core.book.bean.TopRankList;
import com.ibox.widget.CustomExpandableListView;

import java.util.ArrayList;
import java.util.List;

/**
 * Project IBox
 * Created by Amos
 * Created on 2017-10-11
 * Desc
 */

public class TopRankActivity extends BaseActivity {

    Toolbar mTbTopRank;
    SwipeRefreshLayout mSrlTopRank;
    CustomExpandableListView mElvMale;
    CustomExpandableListView mElvFemale;

    private List<TopRankList.MaleBean> mMaleGroupList;
    private List<List<TopRankList.MaleBean>> mMaleChildList;
    private TopRankAdapter maleAdapter;

    private List<TopRankList.MaleBean> mFemaleGroupList;
    private List<List<TopRankList.MaleBean>> mFemaleChildList;
    private TopRankAdapter femaleAdapter;

    public static void startActivity(Context context) {
        context.startActivity(new Intent(context, TopRankActivity.class));
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_top_rank;
    }

    @Override
    public void initView() {
        mTbTopRank = findView(R.id.tbTopRank);
        mSrlTopRank = findView(R.id.srlTopRank);
        mElvMale = findView(R.id.elvMale);
        mElvFemale = findView(R.id.elvFemale);
    }

    @Override
    public void initData() {
        mMaleGroupList = new ArrayList<>();
        mMaleChildList = new ArrayList<>();
        maleAdapter = new TopRankAdapter(this, mMaleGroupList, mMaleChildList);

        mFemaleGroupList = new ArrayList<>();
        mFemaleChildList = new ArrayList<>();
        femaleAdapter = new TopRankAdapter(this, mFemaleGroupList, mFemaleChildList);
    }

    @Override
    public void configViews() {

    }
}
